package com.rags.chess.base;

public class Square {
	private Coordinate coordinate;
	private Color color;
	private Piece piece;
	
	public Square (Coordinate aCoordinate) {
		coordinate = aCoordinate;
		if ((aCoordinate.getRow() + aCoordinate.getColumn()) % 2 == 0)
			color = Color.BLACK;
		else
			color = Color.WHITE;
	}
	
	public Coordinate getCoordinate() {
		return coordinate;
	}
	
	public String getNotation() {
		return coordinate.getNotation();
	}

	public Color getColor() {
		return color;
	}

	public Piece getPiece() {
		return piece;
	}

	public void setPiece(Piece aPiece) {
		this.piece = aPiece;
	}
}
